﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
namespace WPFExcelReport
{
    public partial class TAM06S
    {
        public TAM06S()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VAMEINST();
            this.DataContext = MV;             
            InitializeComponent();
        }  
        public override void OnEXAUFChg(string value)
        {
            TBMain.Clear();
            if (EXAUF.Length<8)
                return;
            dwData = TBMain.NewRow();
            KRS = value.Substring(0, 2);
            LFD = value.Substring(2, 4);
            POS = value.Substring(6, 2);
            dwData["AMEMANDANT"] = app.Mandant;
            dwData["AMENRKRS"] = "AND AMENRKRS= '" + KRS + "'";
            dwData["AMELFDNR"] = "AND AMELFDNR= '" + LFD + "'";
            dwData["AMEPOS"] = "AND AMEPOS= '" + POS + "'"; 
            SResult = TMV.QAME02(dwData);
            MergeData(SResult, false);
        }
    }
}
